<!--
 * @Author: xiuquanxu
 * @Company: kaochong
 * @Date: 2020-12-29 15:22:57
 * @LastEditors: xiuquanxu
 * @LastEditTime: 2020-12-29 15:27:38
-->
<html>
    <meta charset="utf-8"/>
    <style>
        .txt {
            width: 100px;
            height: 100px;
            border-radius: 10px;
            border: 1px solid red;
        }
    </style>
    <body>
        <div id="app" class="txt">

        </div>
    </body>
    <script>
        const ele = document.getElementById('app');
        function createSpan(txt) {
            const span = document.createElement('div');
            span.classList = 'txt'
            span.textContent = txt;
            return span;
        }
        for(let i = 0; i < 100000; i += 1) {
            ele.appendChild(createSpan(i));
        }
    </script>
</html>